<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/in.jsp"%>
<!DOCTYPE html>
<html ng-app="myApp">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width,height=device-height">
    <script src="${ctx}/js/angular/angular.js"></script>
    <script src="${ctx}/js/ionic.bundle.min.js"></script>
    <script src="${ctx}/js/app.js"></script>
    <script src="${ctx}/service/config.js"></script>
    <script src="${ctx}/js/giftCtrl.js"></script>

    <link rel="stylesheet" type="text/css" href="${ctx}/css/ionic.min.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/css/gift.css">
    <title>兑换礼品</title>
</head>
<body ng-controller="giftCtrl">
    <ion-content style="background-color: #f0f0f0">
        <div class="giftList">
            <div class="{{$odd?'giftEven': 'giftOld'}}"   ng-repeat="gift in giftList" style="background-color: #FFFFFF">
                <div class="gift{{$index}}" id="{{gift.id}}">
                <!--<img src="{{gift.pic}}" style="width: 50%;height: 100px">-->
                <img src="images/head_01.jpg" style="width: 50%;height: 100px">
                <p>【{{gift.name}}】{{gift.describe}}</p>
                <p><a style="color: #ef0a14"></a>{{gift.integration}}积分&nbsp;&nbsp;<button ng-click="openModal(gift.id,gift.name)">兑换</button></p>
                </div>
            </div>

        </div>


    </ion-content>
    <!--<div class="submitButton">-->
        <!--<button class="button button-block button-assertive">提交</button>-->
    <!--</div>-->
</body>

</html>

<script id="giftOrder.html" type="text/ng-template">
    <ion-modal-view >
        <ion-header-bar align-title="center" class="bar-light">
            <div class="buttons">
                <button class="button button-icon button-clear icon ion-ios-arrow-back" ng-click="closeModal()"></button>
            </div>
            <h1 class="title">兑换礼品</h1>

        </ion-header-bar>

        <ion-content>
            <div class="list" >

                <!--<a class="item item-thumbnail-left " ng-repeat="business in articalList.list" href="#/travel_detail/{{business.article.id}}" >-->
                <a class="item item-thumbnail-left item-button-right " style=" border-top: 1px solid rgba(87, 43, 43, 0.13);min-height: 100px !important;padding-left: 80px;padding-top: 7px;padding-bottom: 0px"  >
                    <img class="business_image" src="images/head_01.jpg" style="">
                    <div class="item-body item-change-overflow" style="width: 150px">
                        <h3 style="width: 150px;margin-top: 5px !important;">【{{order.giftName}}】{{order.giftDescrition}}</h3>
                    </div>
                </a>

                <a class="item " >
                    <i class=""></i>
                    兑换数量
                    <span class="item-note">
                        <div style="border:1px solid rgba(13, 14, 7, 0.08);width: 60px;height: 24px">
                           <div ng-click="subNum()" style="border-right: 1px solid rgba(13, 14, 7, 0.08);width:17px;height: 23px ;float: left;text-align: center;color: #00c9c9">
                               -
                           </div>
                            <div  style="border-right: 1px solid rgba(13, 14, 7, 0.08);width:24px;height: 23px;float: left ;text-align: center">
                            {{order.number}}
                            </div>
                            <div  ng-click="addNum()" style="border-right: 1px solid rgba(13, 14, 7, 0.08);width:17px;height: 23px ;float: left;text-align: center;color: #00cdcd">
                                +
                            </div>
                        </div>
                    </span>
                </a>
                <div class="submitButton">
                <button class="button button-block button-assertive" ng-click="submitOrder()">提交</button>
                </div>
            </div>
        </ion-content>
    </ion-modal-view>


</script>

